home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / mint / lib / mntlib44.zoo / mntlib / execle.c < prev    next >
C/C++ Source or Header  |  1994-03-01  |  414b  |  26 lines

  1. /*
  2.     execle for MiNT/TOS; written by Eric R. Smith, and
  3.     placed in the public domain
  4. */
  5.  
  6. #include <stdarg.h>
  7. #include <process.h>
  8. #include <unistd.h>
  9.  
  10. #ifdef __STDC__
  11. int execle(const char *path, ...)
  12. #else
  13. int execle(path)
  14.     char    *path;
  15. #endif
  16. {
  17.     va_list args;
  18.     char    ***envp;
  19.  
  20.     va_start(args, path);
  21.  
  22.     for (envp = (char ***) args ; *envp ; envp++)
  23.         ;
  24.     return _spawnve(P_OVERLAY, path, (char **)args, *(envp+1));
  25. }
  26.